package hos.controller;

import java.util.Scanner;

import hos.dao.StaffDaoImp;
import hos.po.Staff;
import hos.service.StaffServiceImp;

public class StaffController {
	public Staff StaffLogin() {
		System.out.println("---------------------------");
		System.out.println("管理员登录");
		System.out.println("请输入账号");
		Scanner scan = new Scanner(System.in);
		String id = scan.next();
		System.out.println("请输入密码");
		String pwd = scan.next();
		StaffServiceImp staffService = new StaffServiceImp();
		String res =  staffService.StaffAutoLogin(id, pwd);
		System.out.println(res);
		StaffDaoImp staffDao = new StaffDaoImp();
		Staff User = staffDao.selectByIdAndPwd(id, pwd);
		return User;
	}
}
